import React, { ReactElement } from 'react';
import { Row } from 'antd';
import style from './index.module.css';

interface IProps {
  title: string;
  extra?: ReactElement;
}

const PageTitle = (props: IProps) => {
  const { title, extra } = props;
  return (
    <Row justify="space-between">
      <div className={style.pageTitle}>
        <div className={style.text}>{title}</div>
        <div className={style.bottomline}>
          <div className={style.line2}></div>
        </div>
      </div>
      <div>{extra}</div>
    </Row>
  );
};

export default PageTitle;
